// v-bind动态更新元素上的属性

var app = {
    el: "#app",
    data: {
        isActive: true,
        error: null
    },
    computed: {
        classes: function () {
            var o1 = {

                active: app.data.isActive && !app.data.error,
                'text-fail': app.data.error && this.data.type === 'fail'
            }
            // active: true text-fail: null
            console.log(o1);
            return o1;
        }
    }
}

app.computed.classes();
console.log(app.data.error)
console.log(!app.data.error)
console.log(app.data.type)
console.log(app.data.type==='fail')
app.data.type='fail';
console.log(app.data.type)
